/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package EntitiesTier;

import DataTier.AdicaoDAO;
import DataTier.AditamentoDAO;
import DataTier.LiquidacaoDAO;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 *
 * @author Douglas
 */
public class ClContrato {
  private int CONT_COD;
  private int CONT_CODFOR;
  private Date CONT_DATAASSI;
  private Date CONT_DATAFIM;
  private int CONT_DURACAO;
  private String CONT_NOME;
  private String CONT_SET;
  private String CONT_STATUS;
  private float CONT_VALORINI;
  private float CONT_VALORFIM;
  private List<ClAdicao> CONT_ADICAO;
  private List<ClAditamento> CONT_ADITAMENTO;
  private List<ClLiquidacao> CONT_LIQUIDACAO;
  private AdicaoDAO adicaoDAO;
  private AditamentoDAO aditamentoDAO;
  private LiquidacaoDAO liquidacaoDAO;
  private int CONT_TIPODUR;

  
    public ClContrato() 
    {
        CONT_COD = 0;
        CONT_CODFOR  = 0;
        CONT_DATAASSI = new Date();
        CONT_DATAFIM = new Date();
        CONT_DURACAO = 0;
        CONT_NOME = "";
        CONT_STATUS = "";
        CONT_VALORINI = 0;
        CONT_VALORFIM = 0;
        CONT_SET = "";
        CONT_ADICAO = new ArrayList<ClAdicao>();
        CONT_ADITAMENTO = new ArrayList<ClAditamento>();
        CONT_LIQUIDACAO = new ArrayList<ClLiquidacao>();
    }

    public ClContrato(int cont_cod, int cont_codfor, String cont_nome, Date cont_dataassin, Date cont_datafim, int cont_duracao,
            String cont_status, float cont_valorini, float cont_valorfim, String cont_set, int cont_tipodur) throws Exception 
    {
        this.CONT_COD = cont_cod;
        this.CONT_CODFOR  = cont_codfor;
        this.CONT_NOME = cont_nome;
        this.CONT_DATAASSI = cont_dataassin;
        this.CONT_DATAFIM = cont_datafim;
        this.CONT_DURACAO = cont_duracao;
        this.CONT_STATUS = cont_status;
        this.CONT_VALORINI = cont_valorini;
        this.CONT_VALORFIM = cont_valorfim;
        this.CONT_SET = cont_set;
        this.CONT_TIPODUR = cont_tipodur;
        
        adicaoDAO = new AdicaoDAO();                
        this.CONT_ADICAO = adicaoDAO.todos();
        
        aditamentoDAO = new AditamentoDAO();
        this.CONT_ADITAMENTO = aditamentoDAO.todos();
        
        liquidacaoDAO = new LiquidacaoDAO();
        this.CONT_LIQUIDACAO = liquidacaoDAO.todos();        
        
    }    

    /**
     * @return the CONT_COD
     */
    public int getCONT_COD() {
        return CONT_COD;
    }

    /**
     * @param CONT_COD the CONT_COD to set
     */
    public void setCONT_COD(int CONT_COD) {
        this.CONT_COD = CONT_COD;
    }

    /**
     * @return the CONT_CODFOR
     */
    public int getCONT_CODFOR() {
        return CONT_CODFOR;
    }

    /**
     * @param CONT_CODFOR the CONT_CODFOR to set
     */
    public void setCONT_CODFOR(int CONT_CODFOR) {
        this.CONT_CODFOR = CONT_CODFOR;
    }

    /**
     * @return the CONT_DATAASSI
     */
    public Date getCONT_DATAASSI() {
        return CONT_DATAASSI;
    }

    /**
     * @param CONT_DATAASSI the CONT_DATAASSI to set
     */
    public void setCONT_DATAASSI(Date CONT_DATAASSI) {
        this.CONT_DATAASSI = CONT_DATAASSI;
    }

    /**
     * @return the CONT_DATAFIM
     */
    public Date getCONT_DATAFIM() {
        return CONT_DATAFIM;
    }

    /**
     * @param CONT_DATAFIM the CONT_DATAFIM to set
     */
    public void setCONT_DATAFIM(Date CONT_DATAFIM) {
        this.CONT_DATAFIM = CONT_DATAFIM;
    }

    /**
     * @return the CONT_DURACAO
     */
    public int getCONT_DURACAO() {
        return CONT_DURACAO;
    }

    /**
     * @param CONT_DURACAO the CONT_DURACAO to set
     */
    public void setCONT_DURACAO(int CONT_DURACAO) {
        this.CONT_DURACAO = CONT_DURACAO;
    }

    /**
     * @return the CONT_NOME
     */
    public String getCONT_NOME() {
        return CONT_NOME;
    }

    /**
     * @param CONT_NOME the CONT_NOME to set
     */
    public void setCONT_NOME(String CONT_NOME) {
        this.CONT_NOME = CONT_NOME;
    }

    /**
     * @return the CONT_STATUS
     */
    public String getCONT_STATUS() {
        return CONT_STATUS;
    }

    /**
     * @param CONT_STATUS the CONT_STATUS to set
     */
    public void setCONT_STATUS(String CONT_STATUS) {
        this.CONT_STATUS = CONT_STATUS;
    }

    /**
     * @return the CONT_VALORINI
     */
    public float getCONT_VALORINI() {
        return CONT_VALORINI;
    }

    /**
     * @param CONT_VALORINI the CONT_VALORINI to set
     */
    public void setCONT_VALORINI(float CONT_VALORINI) {
        this.CONT_VALORINI = CONT_VALORINI;
    }

    /**
     * @return the CONT_VALORFIM
     */
    public float getCONT_VALORFIM() {
        return CONT_VALORFIM;
    }

    /**
     * @param CONT_VALORFIM the CONT_VALORFIM to set
     */
    public void setCONT_VALORFIM(float CONT_VALORFIM) {
        this.CONT_VALORFIM = CONT_VALORFIM;
    }

    /**
     * @return the CONT_SET
     */
    public String getCONT_SET() {
        return CONT_SET;
    }

    /**
     * @param CONT_SET the CONT_SET to set
     */
    public void setCONT_SET(String CONT_SET) {
        this.CONT_SET = CONT_SET;
    }

    /**
     * @return the CONT_TIPODUR
     */
    public int getCONT_TIPODUR() {
        return CONT_TIPODUR;
    }

    /**
     * @param CONT_TIPODUR the CONT_TIPODUR to set
     */
    public void setCONT_TIPODUR(int CONT_TIPODUR) {
        this.CONT_TIPODUR = CONT_TIPODUR;
    }
}
